<template>
    hello
    <div class="">
        <ul>
            <li v-for="(item, index) in imgData" :key="index" :src="item" >
               <span :style="{background:item.color}">{{item.title}}</span>
            </li>

        </ul>

    </div>
</template>

<script>
import { inject, reactive, toRefs } from 'vue'

export default {
    setup () {
        const state = reactive({
            imgData: inject('items')
        })
    
        return {
            ...toRefs(state)
        }
    }
}
</script>

<style  scoped>

</style>